

#ifndef __CE_MOUSE_H__
#define __CE_MOUSE_H__

#include <cegfx/ceexport.h>
#include <cecore/iqf.h>
#include <dinput.h>

class CE_GFX_API ceMouse : public iBase
{
	IQF_DECLARATION;
private:
	LPDIRECTINPUTDEVICE8	mouseDevice;

public:
	struct MouseData
	{
		LONG xaxis;
		LONG yaxis;
		BYTE buttons[3];
		BYTE pad;
	} mouseData[2];

	int idx0;
	int idx1;
	
public:
	ceMouse ();
	~ceMouse ();

	bool Initialize (LPDIRECTINPUT8 input, HWND hWnd);
	bool UpdateState ();

	virtual int GetDX () const;

	virtual int GetDY () const;

	virtual bool IsButtonDown (int button) const;

	virtual bool IsButtonUp (int button) const;

	virtual bool IsButtonPressed (int button) const;

	virtual bool IsButtonReleased (int button) const;
};

#endif /* ! __CE_MOUSE_H__ */ 
